package com.eastedu.repository.question.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.eastedu.repository.permission.po.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 袁松明
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table(name = "t_question_association")
@TableName("t_question_association")
public class QuestionAssociationPO extends BaseEntity {

    /**
     * 关联类型
     */
    @Column(name = "type", columnDefinition = "tinyint comment '关联类型'", nullable = false)
    private Integer type;
    /**
     * 试题ID
     */
    @Column(name = "question_id", columnDefinition = "bigint comment '试题ID'", nullable = false)
    private Long questionId;
    /**
     * 关联的GUID
     */
    @Column(name = "association_id", length = 40, columnDefinition = "varchar(40) comment '关联的GUID'", nullable = false)
    private String associationId;

    /**
     * 关联的名称
     */
    @Column(name = "association_name", length = 200, columnDefinition = "varchar(200) comment '关联的GUID名称'")
    private String associationName;

    /**
     * 关联的根GUID，如章节树根ID,没有的话不传
     */
    @Column(name = "association_root_id", length = 40, columnDefinition = "varchar(40) default '0' comment '关联的根GUID，如章节树根ID'")
    private String associationRootId;

    /**
     * 关联的根GUID，如章节树根ID,没有的话不传
     */
    @Column(name = "association_root_name", length = 200, columnDefinition = "varchar(200) default '0' comment '关联的根GUID名称，如章节树根ID'")
    private String associationRootName;


    @Column(name = "create_time", columnDefinition = "bigint comment '创建时间'", nullable = false, updatable = false)
    private Long createTime;

    @Column(name = "update_time", columnDefinition = "bigint comment '更新时间'", nullable = false)
    private Long updateTime;
}
